Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[merge] feat(metrics) histograms with user-defined bins #610

Merged
merged 1 commit into from
Oct 23, 2024

Conversation

thibaultcha
Copy link
Member

No description provided.

Copy link

codecov bot commented Oct 22, 2024

Codecov Report

Attention: Patch coverage is 98.21429% with 1 line in your changes missing coverage. Please review.

Project coverage is 90.68720%. Comparing base (7fac221) to head (321e69f).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
src/common/metrics/ngx_wa_histogram.c 97.95918% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@                 Coverage Diff                 @@
##                main        #610         +/-   ##
===================================================
- Coverage   90.80161%   90.68720%   -0.11441%     
===================================================
  Files             52          52                 
  Lines          11165       11103         -62     
===================================================
- Hits           10138       10069         -69     
- Misses          1027        1034          +7     
Files with missing lines Coverage Δ
src/common/lua/ngx_wasm_lua_ffi.c 95.15152% <100.00000%> (-0.76685%) ⬇️
src/common/lua/ngx_wasm_lua_ffi.h 100.00000% <100.00000%> (ø)
src/common/metrics/ngx_wa_metrics.c 92.21790% <100.00000%> (ø)
src/common/metrics/ngx_wa_metrics.h 100.00000% <ø> (ø)
src/common/proxy_wasm/ngx_proxy_wasm_host.c 93.91206% <100.00000%> (ø)
src/common/metrics/ngx_wa_histogram.c 98.70968% <97.95918%> (-0.44286%) ⬇️

... and 7 files with indirect coverage changes

Flag Coverage Δ
unit 90.57160% <100.00000%> (+0.03851%) ⬆️
valgrind 81.13524% <59.57447%> (-1.32246%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

@thibaultcha thibaultcha force-pushed the feat/custom-histograms-merge branch 4 times, most recently from cca9f01 to 01ed9b9 Compare October 23, 2024 17:25
This feature is only available through the FFI.

If a user provides a list of numbers when defining a histogram, those
numbers will be used as the upper-bounds of the histogram's bins.

For instance, the following code:

    local shm = require "resty.wasmx.shm"
    shm.metrics:define("h", shm.metrics.HISTOGRAM, { bins = { 1, 3, 5 } })

Creates a histogram with bins `[0, 1] (1, 3] (3, 5] (5, Inf+]`.

Signed-off-by: Thibault Charbonnier <[email protected]>
@thibaultcha thibaultcha merged commit 3bb2f15 into main Oct 23, 2024
31 checks passed
@thibaultcha thibaultcha deleted the feat/custom-histograms-merge branch October 23, 2024 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants